home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / tex / td187src.lzh / MAGICAES.D < prev    next >
Text File  |  1991-06-08  |  21KB  |  627 lines

  1. (*######################################################################
  2.                                                                         
  3.   MAGIC         Modula's  All purpose  GEM  Interface  Cadre
  4.                 ¯         ¯            ¯    ¯          ¯
  5. ########################################################################
  6.  
  7.   AES   Application Environment Services        Interface for Modula-2
  8.  
  9. ########################################################################
  10.   V2.00  17.10.90  Peter Hellinger      Anpassung an neues MagicSys
  11.   V1.03  26.09.90  Peter Hellinger      Parameter überarbeitet
  12.   V1.02  28.06.90  Peter Hellinger      Bug in OBJECT-Deklaration gefixt
  13.   V1.01  18.06.90  Peter Hellinger      Xgrf-Aufrufe ergänzt 
  14.   V1.00  (C) by    Peter Hellinger
  15. ######################################################################*)
  16.  
  17. DEFINITION MODULE MagicAES;
  18.  
  19. FROM SYSTEM     IMPORT  ADDRESS;
  20. FROM MagicSys   IMPORT  Nil, Null,
  21.                         Bit0, Bit1, Bit2, Bit3, Bit4, Bit5, Bit6, Bit7,
  22.                         Bit8, Bit9, Bit10, Bit11, Bit12, Bit13, Bit14, Bit15,
  23.                         LOC, Byte, ByteSet, sWORD, sINTEGER, sCARDINAL, sBITSET,
  24.                         lWORD, lINTEGER, lCARDINAL, lBITSET;
  25.  
  26. CONST   MouseLeft =     Bit0;   (* Maustasten *)
  27.         MouseRight =    Bit1;
  28.  
  29.  
  30. TYPE    AESGLOBAL =     RECORD
  31.                          apVersion:     sCARDINAL;
  32.                          apCount:       sCARDINAL;
  33.                          apId:          sCARDINAL;
  34.                          apPprivate:    lCARDINAL;
  35.                          apPtree:       ADDRESS;
  36.                          apPmem:        ADDRESS;
  37.                          apLmem:        sCARDINAL;
  38.                          apNplanes:     sCARDINAL;
  39.                          Reserved1:     sCARDINAL;
  40.                          Reserved2:     sCARDINAL;
  41.                          apBvdisk:      sBITSET;
  42.                          apBvhard:      sBITSET;
  43.                         END;
  44.  
  45. TYPE    tControl =      RECORD
  46.                          opcode:        sINTEGER;
  47.                          sizeIntIn:     sINTEGER;
  48.                          sizeIntOut:    sINTEGER;
  49.                          sizeAddrIn:    sINTEGER;
  50.                          sizeAddrOut:   sINTEGER;
  51.                         END;
  52.  
  53. TYPE    tIntIn =        ARRAY [0..16] OF sINTEGER;
  54.         tIntOut =       ARRAY [0.. 7] OF sINTEGER;
  55.         tAddrIn =       ARRAY [0.. 2] OF ADDRESS;
  56.         tAddrOut =      ARRAY [0.. 1] OF ADDRESS;
  57.  
  58. VAR     AESControl:     tControl;
  59.         AESGlobal:      AESGLOBAL;
  60.         AESIntIn:       tIntIn;
  61.         AESIntOut:      tIntOut;
  62.         AESAddrIn:      tAddrIn;
  63.         AESAddrOut:     tAddrOut;
  64.  
  65. VAR     AESPB:          RECORD
  66.                          cbControl:     POINTER TO tControl;
  67.                          cbPglobal:     POINTER TO AESGLOBAL;
  68.                          cbPintin:      POINTER TO tIntIn;
  69.                          cbPintout:     POINTER TO tIntOut;
  70.                          cbPadrin:      POINTER TO tAddrIn;
  71.                          cbPadrout:     POINTER TO tAddrOut;
  72.                         END;
  73.  
  74.  
  75. VAR     CallResult:  sINTEGER;
  76.  
  77.  
  78. PROCEDURE AESCall (op, c1, c2, c3, c4: sINTEGER): sINTEGER;
  79.  
  80.  
  81. (*-- AES-Objc --------------------------------------------------------*)
  82.  
  83. CONST   GBOX =          20;
  84.         GTEXT =         21;
  85.         GBOXTEXT =      22;
  86.         GIMAGE =        23;
  87.         GPROGDEF =      24;
  88.         GIBOX =         25;
  89.         GBUTTON =       26;
  90.         GBOXCHAR =      27;
  91.         GSTRING =       28;
  92.         GFTEXT =        29;
  93.         GFBOXTEXT =     30;
  94.         GICON =         31;
  95.         GTITLE =        32;
  96.  
  97. CONST   SELECTABLE =    Bit0;
  98.         DEFAULT =       Bit1;
  99.         Exit =          Bit2;   (* EXIT ist reserviertes Wort... *)
  100.         EDITABLE =      Bit3;
  101.         RBUTTON =       Bit4;
  102.         LASTOB =        Bit5;
  103.         TOUCHEXIT =     Bit6;
  104.         HIDETREE =      Bit7;
  105.         INDIRECT =      Bit8;
  106.  
  107. CONST   SELECTED =      Bit0;
  108.         CROSSED =       Bit1;
  109.         CHECKED =       Bit2;
  110.         DISABLED =      Bit3;
  111.         OUTLINED =      Bit4;
  112.         SHADOWED =      Bit5;
  113.         DRAW3D =        Bit6;
  114.         WHITEBAK =      Bit7;
  115.                         
  116. CONST   WHITE =          0;     (* Farben *)
  117.         BLACK =          1;
  118.         RED =            2;
  119.         GREEN  =         3;
  120.         BLUE  =          4;
  121.         CYAN  =          5;
  122.         YELLOW  =        6;
  123.         MAGENTA  =       7;
  124.         LWITHE =         8;
  125.         LBLACK  =        9;
  126.         LRED =          10;
  127.         LGREEN =        11;
  128.         LBLUE =         12;
  129.         LCYAN =         13;
  130.         LYELLOW =       14;
  131.         LMAGENTA =      15;
  132.  
  133.  
  134. TYPE    BoxInfo =       RECORD
  135.                          char:  CHAR;   (* Bit 24..31 *)
  136.                          frame: CHAR;   (* Bit 16..23 *)
  137.                          flags: sBITSET; (* Bit 0..15  *)
  138.                         END;           
  139.  
  140. TYPE    TEDINFO =       RECORD
  141.                          tePtext:       POINTER TO ARRAY [0..255] OF CHAR;
  142.                          tePtmplt:      POINTER TO ARRAY [0..255] OF CHAR;
  143.                          tePvalid:      POINTER TO ARRAY [0..255] OF CHAR;
  144.                          teFont:        sINTEGER;
  145.                          teResvd1:      sINTEGER;
  146.                          teJust:        sINTEGER;
  147.                          teColor:       sINTEGER;
  148.                          teResvd2:      sINTEGER;
  149.                          teThickness:   sINTEGER;
  150.                          teTxtlen:      sINTEGER;
  151.                          teTmplen:      sINTEGER;
  152.                         END;
  153.  
  154. TYPE    BITBLK =        RECORD
  155.                          biData:        ADDRESS;
  156.                          biWb:          sINTEGER;
  157.                          biHl:          sINTEGER;
  158.                          biX:           sINTEGER;
  159.                          biY:           sINTEGER;
  160.                          biColor:       sINTEGER;
  161.                         END;    
  162.  
  163. TYPE    PtrPARMBLK =    POINTER TO PARMBLK;
  164.         PARMBLK =       RECORD
  165.                          pbTree:        ADDRESS;
  166.                          pbObj:         sINTEGER;
  167.                          prPrevstate:   sBITSET;
  168.                          prCurrstate:   sBITSET;
  169.                          pbX:           sINTEGER;
  170.                          pbY:           sINTEGER;
  171.                          pbW:           sINTEGER;
  172.                          pbH:           sINTEGER;
  173.                          pbXc:          sINTEGER;
  174.                          pbYc:          sINTEGER;
  175.                          pbWc:          sINTEGER;
  176.                          pbHc:          sINTEGER;
  177.                          pbParm:        ADDRESS;
  178.                         END;
  179.  
  180. TYPE    USERBLK =       RECORD
  181.                          ubCode:        PROC;
  182.                          ubPara:        PtrPARMBLK;
  183.                         END;
  184.  
  185.  
  186. TYPE    ICONBLK =       RECORD
  187.                          ibPmask:       ADDRESS;
  188.                          ibPdata:       ADDRESS;
  189.                          ibPtext:       ADDRESS;
  190.                          ibChar:        sINTEGER;
  191.                          ibXchar:       sINTEGER;
  192.                          ibYchar:       sINTEGER;
  193.                          ibXicon:       sINTEGER;
  194.                          ibYicon:       sINTEGER;
  195.                          ibWicon:       sINTEGER;
  196.                          ibHicon:       sINTEGER;
  197.                          ibXtext:       sINTEGER;
  198.                          ibYtext:       sINTEGER;
  199.                          ibWtext:       sINTEGER;
  200.                          ibHtext:       sINTEGER;
  201.                          ibResvd:       sINTEGER;
  202.                         END;
  203.  
  204.  
  205. TYPE    OBJECT = RECORD
  206.                   obNext:       sINTEGER;
  207.                   obHead:       sINTEGER;
  208.                   obTail:       sINTEGER;
  209.                   obType:       sINTEGER;
  210.                   obFlags:      sBITSET;
  211.                   obState